<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <title>online-asr admin</title>

    <!-- Bootstrap core CSS -->
    <!--link href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">-->
    <link href="/static/admin/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="/static/admin/dashboard.css" rel="stylesheet">

    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
    <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
    <!--<script src="../../assets/js/ie-emulation-modes-warning.js"></script>-->

	<script language="JavaScript"> 
    function myrefresh() 
    { 
        window.location.reload(); 
    } 
    setTimeout('myrefresh()',2000); //指定2秒刷新一次 
    </script> 
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>

    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">Online Asr Admin & Diagnostics</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav navbar-right">
            <li><a href="#">Dashboard</a></li>
            <li><a href="#">Settings</a></li>
            <li><a href="#">Profile</a></li>
            <li><a href="#">Help</a></li>
          </ul>
          <form class="navbar-form navbar-right">
            <input type="text" class="form-control" placeholder="Search...">
          </form>
        </div>
      </div>
    </nav>

    <div class="container-fluid">
      <div class="row">
        <div class="col-sm-3 col-md-2 sidebar">
          <ul class="nav nav-sidebar">
            <li class="active"><a href="/admin">Overview<span class="sr-only">(current)</span></a></li>
            <li><a href="/admin/connections">Connections</a></li>
            <li><a href="/admin/history">History</a></li>
            <li><a href="/admin/logs">Logs</a></li>
            <li><a href="/admin/search">Search</a></li>
          </ul>
          <!--
            <ul class="nav nav-sidebar">
            <li><a href="">Nav item</a></li>
            <li><a href="">Nav item again</a></li>
            <li><a href="">One more nav</a></li>
          </ul>
        -->
        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
          <h1 class="page-header">   Current Connections: {{ num_connection }} </h1>
		      <!--<h2 class="sub-header"> Current Connections: {{ num_connection }}  </h2> -->
          <div class="table-responsive">
            <table class="table table-striped">
      				<tr>
      					<th>Decoders Ip</th>
      					<th>Decoders Port</th>
      					<th>MaxThread</th>
      					<th>FreeThread</th>
      					<th>Available</th>
      					<th>Operation</th>
      				</tr>
      				{% for item in items %}
      					<tr>
      						<td>{{ item[0] }}</td>
      						<td>{{ item[1] }}</td>
      						<td>{{ item[2] }}</td>
      						<td>{{ item[3] }}</td>
      						<td>{{ item[4] }}</td>
      						{% if item[5] == None %}
      						<td>-</td>
      						{% else %}
      						<td><a href={{ item[5] }} >restart</a></td>
      						{% end %}
      					</tr>
      				{% end %}
            </table>
          </div>
        </div>
      </div>
    </div>

    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="/static/admin/jquery.min.js"></script>
    <script src="/static/admin/bootstrap.min.js"></script>
    <!-- Just to make our placeholder images work. Don't actually copy the next line! -->
    <!--<script src="../../assets/js/vendor/holder.min.js"></script>-->
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <!--<script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>-->
  </body>
</html>
